//import counter from './store/Counter.js';
import {observer} from 'mobx-react';
//import cart from './store/Cart.js';
import useStore from './store/index';
function App() {
  const {counter,cart}=useStore()
  return (
    <div className="App">
      <h3>计数器案例</h3>
      <div>点击次数：{counter.count}</div>
      <button onClick={()=> counter.increment()}>加1</button>
      <button onClick={counter.incrementAsync}>加1异步</button>
      <button onClick={counter.decrement}>减1</button>
      <div>double:{counter.double}</div>
      <button onClick={()=>counter.reset()}>重置</button>
      <div>{cart.list}</div>
    </div>
  );
}
export default observer(App);
